#pragma once

float distance_3f(float v[3]);
float distance_2v(float v1[3],float v2[3]);
void normcrossprod(float v1[3],float v2[3],float out[3]);
void multiply(float v[3],float out[3], float k);
void devide(float v[3],float out[3], float k);
void minus_3f(float v1[3],float v2[3],float out[3]);
void plus_3f(float v1[3],float v2[3],float out[3]);
void cross(float v1[3],float v2[3],float out[3]);
void normalize(float v[3]);
void normalize_out(float v[3],float[3]);
void rotate_axis(float angle, float vec[3],float axis[3],float out[3]);
float angle_point(float[3],float[3]);
float cos_point(float[3],float[3]);
float point(float[3],float[3]);
float lerp(float pre,float next,float t);
float get_angle_y(float vec[3]);
void avg_clock_normcross(float d[4][3],float out[3]);
void inverse_matrix(float* input,float* output,int row);
void multi_4x4_matrix(float[16],float[16],float[16]);
void multi_4x4_m_v(float matrix[16],float v[4], float out[4]);
void multi_4x4_m_v_3(float matrix[16],float v[4], float out[4]);
void transpose(float* matrix,int row);
void print_vector3f(char* name,float f[3]);
bool wise(float p1[3],float p2[3], float p3[3]);

double dir_angle(double x,double y);
double angle_0_360(double ang);